<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    
    <%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
    
    <script type="text/javascript">
			dojo.event.topic.subscribe("/save", function(data, type, request) {
			    if(type == "load") {
					dojo.byId("name").value = "";
				}
			});

			dojo.event.topic.subscribe("/edit", function(data, type, request) {
			    if(type == "before") {
					var id = data.split("_")[1];

					var tr = dojo.byId("row_"+id);
					var tds = tr.getElementsByTagName("td");

					//dojo.byId("id").value = id;
					dojo.byId("name").value = dojo.string.trim(dojo.dom.textContent(tds[0]));
					//dojo.byId("lastName").value = dojo.string.trim(dojo.dom.textContent(tds[1]));
				}
			});
		</script>

<s:form  action="menutree_category_edit" >
	编号：<s:property value="category.id"/>
	<s:textfield name="category.name" label="名称" id="name"></s:textfield>
	<sx:submit label="保存" notifyTopics="/save" targets="inputFields" />
</s:form>